package com.wyp168.leetcode;

/**
 * @ClassName IsFilpString
 * @Description TODO
 * @Author wyp168
 * @Date 2022/9/29 08:59
 */
public class IsFlipedString {
    public static void main(String[] args) {
        String s1 = "helloworld";
        String s2 = "ldhellowor";

        IsFlipedString isFlipedString = new IsFlipedString();
        System.out.println(isFlipedString.isFlipedString(s1, s2));
    }

    public boolean isFlipedString(String s1, String s2) {
        return s1.length() == s2.length() && (s1 + s1).contains(s2);
    }
}
